package com.niubility.other;

public class StatusCode{
    public final String ACTIVE_SECCESS = "100";//操作成功
    public final String ACTIVE_FILI = "108";//操作失败
    public final String FIND_ERROR = "101";//查询失败
    public final String NO_DATAS = "102";//未查询到数据
    public final String UN_SIGN = "103";//未登陆
    public final String SAVE_ERROR = "104";//传参错误
    public final String DELETE_ERROR = "105";//删除失败
    public final String UPDATE_ERROR = "106";//更新失败
    public final String NET_ERROR = "107";//网络异常
    public final String NOT_KNOW = "109";//未知错误

    public String returnCode;
    public StatusCode(int code) {
        switch (code){
            case 100:returnCode = ACTIVE_SECCESS;break;
            case 101:returnCode = FIND_ERROR;break;
            case 102:returnCode = NO_DATAS;break;
            case 103:returnCode = UN_SIGN;break;
            case 104:returnCode = SAVE_ERROR;break;
            case 105:returnCode = DELETE_ERROR;break;
            case 106:returnCode = UPDATE_ERROR;break;
            case 107:returnCode = NET_ERROR;break;
            case 108:returnCode = ACTIVE_FILI;break;
            default:returnCode = NOT_KNOW;
        }
    }
}
